<#setting number_format="#.##"/>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>计收契税明细表</title>
    <style>
        body {
            font-family: SimSun, Arial Unicode MS, Lucida Sans Unicode, Arial, verdana, arial, helvetica, sans-serif;
        }

        .printContent {
            margin: 0px;
            padding: 0px;
            font-size: 16px;
        }

        .printContent p {
            margin: 0px;
            padding: 0px;
            text-align: left;
            text-indent: 2em;
            line-height: 24px;
            width: 95%;
            margin-left: 20px;
        }

        .printContent .printTitle {
            text-indent: 0em;
            font-size: 24px;
            text-align: center;
            font-weight: bold;
            height: 36px;
        }

        .border {
            text-align: center;
            padding-left: 10px;
            padding-right: 10px;
            border-bottom: 1px solid #000000;
        }

        .borderBlock500 {
            text-align: center;
            width: 500px;
            display: inline-block;
            border-bottom: 1px solid #000000;
        }

        .paddingLeft {
            padding-left: 300px;
        }

        @page {
            margin: 5mm 10mm 0mm 10mm;
            size: 297mm 210mm;
        }

        .pageBreak {
            page-break-before: always
        }

        .table_border_top_hidden {
            border-top: hidden;
        }

        .table_border_bottom_hidden {
            border-bottom: hidden;
            text-overflow: inherit;
            overflow: visible;
            height: auto;
            white-space: normal;
        }

        table {
            margin: auto;
            width: 95%;
            border-collapse: collapse;
            border-top: 2px solid #000000;
            border-left: 2px solid #000000;
            border-right: 1px solid #000000;
            border-bottom: 1px solid #000000;
            -fs-table-paginate: paginate;
            border-spacing: 0;
        }

        th, td {
            border-right: 1px solid #000000;
            border-bottom: 1px solid #000000;
            font-size: 16px;
            margin-left: 5px;
            height: 28px;
            page-break-inside: avoid;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="printContent">
    <p class="printTitle">
        计收契税明细表
    </p>
    <table class="table_border_bottom_hidden">
        <tr>
            <td colspan="1" style="width: 20%">被征收人</td>
            <td colspan="2" style="width: 30%">${strUtils.getNotNull(contract.name)}</td>
            <td colspan="1">证件号</td>
            <td colspan="2" style="word-wrap:break-word;">${strUtils.getNotNull(contract.idCard)!}</td>
        </tr>
        <tr>
            <td colspan="1">选房号</td>
            <td colspan="2">${strUtils.getNotNull(contract.chooseHouseNum)}</td>
            <td colspan="1" style="width: 20%">联系电话</td>
            <td colspan="2" style="width: 30%">${strUtils.getNotNull(contract.tel)}</td>
        </tr>
    </table>
    <table class="table_border_top_hidden table_border_bottom_hidden">
        <tr>
            <td colspan="6">补偿安置情况</td>
        </tr>
        <tr>
            <td style="width: 20%">项目</td>
            <td style="width: 15%">面积</td>
            <td style="width: 15%">单价</td>
            <td style="width: 15%">金额</td>
            <td style="width: 15%">比率</td>
            <td>备注</td>
        </tr>
        <#if areaList??>
            <#list areaList as areaMap>
                <tr>
                    <td>${strUtils.getNotNull(areaMap['project'])}</td>
                    <td>${bigUtils.getNotNullStr(areaMap['area'])}</td>
                    <td>${bigUtils.getNotNullStr(areaMap['price'])}</td>
                    <td>${bigUtils.getNotNullStr(areaMap['money'])}</td>
                    <td>${strUtils.getNotNull(areaMap['bl'])}</td>
                    <td>${strUtils.getNotNull(areaMap['memo'])}</td>
                </tr>
            </#list>
        </#if>
        <tr>
            <td>安置面积</td>
            <td>${bigUtils.getNotNullStr(contract.chooseHouseAreaTotal)}</td>
            <td></td>
            <td></td>
            <td>1</td>
            <td colspan="6"></td>
        </tr>
    </table>
    <table class="table_border_top_hidden table_border_bottom_hidden">
        <tr>
            <td colspan="${6+size}">安置房</td>
        </tr>
        <tr>
            <td rowspan="2">房号</td>
            <td rowspan="2">安置房面积</td>
            <td colspan="${4+size}">分摊</td>
        </tr>
        <tr>
            <#if areaList??>
                <#list areaList as areaMap>
                    <td>${areaMap['project']}</td>
                </#list>
            </#if>
            <td>房产总价值</td>
            <td>契税(3﹪)</td>
            <td>印花税</td>
        </tr>
        <#assign allTaxHouseMoney =0/>
        <#if houseList??>
            <#list houseList as house>
                <tr>
                    <td>${house.houseNumStr}</td>
                    <td>${bigUtils.getNotNullStr(house.buildArea)}</td>
                    <#if areaList??>
                        <#list areaList as areaMap>
                            <td>
                                ${bigUtils.getBigAndBigMul(house.buildArea,bigUtils.stringToBigDecimal((bigUtils.getBigAndBigDiv(areaMap['area'],contract.chooseHouseAreaTotal,6))?c))}
                            </td>
                        </#list>
                    </#if>
                    <td>${bigUtils.getNotNullStr(house.taxHouseMoney)}</td>
                    <td>${bigUtils.getNotNullStr(house.taxMoney)}</td>
                    <td>${bigUtils.getNotNullStr(house.taxYhsMoney)}</td>
                </tr>
                <#assign allTaxHouseMoney =bigUtils.getSum(allTaxHouseMoney,house.taxHouseMoney)/>

            </#list>
        </#if>
        <tr>
            <td>合计</td>
            <td>${bigUtils.getNotNullStr(contract.chooseHouseAreaTotal)}</td>

            <#if areaList??>
                <#list areaList as areaMap>
                    <td>
                        ${bigUtils.getNotNullStr(areaMap['area'])}
                    </td>
                </#list>
            </#if>

            <td>${bigUtils.getNotNullStr(allTaxHouseMoney)}</td>
            <td>${bigUtils.getNotNullStr(contract.taxHouseMoney)}</td>
            <td>${bigUtils.getNotNullStr(contract.taxHouseYhsMoney)}</td>
        </tr>
        <tr>
            <td colspan="${3+size}">小计</td>
            <td colspan="2">${bigUtils.getSum(contract.taxHouseMoney,contract.taxHouseYhsMoney)}</td>
        </tr>
    </table>
    <table class="table_border_top_hidden">
        <tr>
            <td colspan="6">储藏间与地下车位</td>
        </tr>
        <tr>
            <td>产权人</td>
            <td>房号</td>
            <td>安置房面积</td>
            <td>房产总价值</td>
            <td>契税(3﹪)</td>
            <td>印花税</td>
        </tr>

        <#if storageRoomList??>
            <#list storageRoomList as storageRoom>
                <#assign buyHousePersonStorageRoomList = (buyHousePersonStorageRoomMap[storageRoom.id?c])!/>
                <tr>
                    <td>
                        <#if buyHousePersonStorageRoomList?exists && (buyHousePersonStorageRoomList?size>0)>
                            <#list buyHousePersonStorageRoomList as buyHousePersonStorageRoom>
                                ${(buyHousePersonStorageRoom.name)!}
                            </#list>
                        </#if>
                    </td>
                    <td>${strUtils.getNotNull(storageRoom.houseNumStr)}</td>
                    <td>${bigUtils.getNotNullStr(storageRoom.buildArea)}</td>
                    <td>${bigUtils.getBigAndBigMul(storageRoom.buildArea,2000)}</td>
                    <td>${bigUtils.getNotNullStr(storageRoom.taxMoney)}</td>
                    <td>${bigUtils.getNotNullStr(storageRoom.taxYhsMoney)}</td>

                </tr>

            </#list>
        </#if>
        <#if carLotList??>
            <#list carLotList as carLot>
                <#assign buyHousePersonCarLotList = (buyHousePersonCarLotMap[carLot.id?c])!/>
                <tr>
                    <td>
                        <#if buyHousePersonCarLotList?exists && (buyHousePersonCarLotList?size>0)>
                            <#list buyHousePersonCarLotList as buyHousePersonCarLot>
                                ${(buyHousePersonCarLot.name)!}
                            </#list>
                        </#if>
                    </td>
                    <td>${strUtils.getNotNull(carLot.houseNumStr)}</td>
                    <td>${bigUtils.getNotNullStr(carLot.buildArea)}</td>
                    <td>${bigUtils.getNotNullStr(carLot.price)}</td>
                    <td>${bigUtils.getNotNullStr(carLot.taxMoney)}</td>
                    <td>${bigUtils.getNotNullStr(carLot.taxYhsMoney)}</td>

                </tr>
                <#assign allCarAndStorageTaxMoney =bigUtils.getSum(allCarAndStorageTaxMoney,bigUtils.getBigAndBigMul(bigUtils.getBigAndBigDiv(carLot.price,contract.sfJs,4),0.03))/>
                <#assign allCarAndStorageYhsMoney =bigUtils.getSum(allCarAndStorageYhsMoney,bigUtils.getBigAndBigMul(carLot.price,0.00025))/>

            </#list>
        </#if>
        <tr>
            <td colspan="4">小计</td>
            <td>${bigUtils.getNotNullStr(contract.taxCarAndStorageMoney)}</td>
            <td>${bigUtils.getNotNullStr(contract.taxCarAndStorageYhsMoney)}</td>
        </tr>
        <tr>
            <td colspan="4">契税总计</td>
            <td colspan="2">${bigUtils.getSum(contract.taxMoney,contract.taxYhsMoney)}</td>
        </tr>
    </table>
</div>
</body>
</html>